#include <48func.h>
#include <crypt.h>
#include <shadow.h>
int main(int argc, char *argv[])
{
    char password[] = "123"; //明文密码
    char salt[] = "$6$AiQhkgPuNEsKbRuy$"; // 盐值
    printf("crypt password = %s\n", crypt(password,salt));
    struct spwd * pspwd = getspnam("liaozs");
    printf("spwd password = %s\n", pspwd->sp_pwdp);
    return 0;
}

